package mythesis.gui.main.components;
import mythesis.gui.main.components.api.MenuButton;
import javafx.scene.*;
import javafx.scene.shape.*;
import javafx.scene.paint.*;
import javafx.scene.text.*;
import javafx.scene.input.*;

public class MenuBar extends CustomNode
{
    var dir     = "{{__DIR__}.substring(0, {__DIR__}.length()-20)}resource/";
    public var group = Group
    {
        content:
        [
        		Rectangle
        		{
        		    width     : 260;
        		    height    : 35;
        		    arcHeight : 5;
        		    arcWidth  : 5;
        		    fill      : Color.web("#333366");
        		}
				MenuButton //New
				{
				    translateX: 5
				    translateY: 5
				    icon      : "{dir}icoNew.png"
				    help      : "New AI"
				}
				MenuButton //Open
				{
				    translateX: 35
				    translateY: 5
				    icon      : "{dir}icoOpen.png"
				    help      : "Open AI"
				}
				MenuButton //Save
				{
				    translateX: 65
				    translateY: 5
				    icon      : "{dir}icoSave.png"
				    help      : "Save AI"
				}
				MenuButton //Compile
				{
				    translateX: 95
				    translateY: 5
				    icon      : "{dir}icoCompile.png"
				    help      : "Compile AI"
				}
				MenuButton //Run
				{
				    translateX: 125
				    translateY: 5
				    icon      : "{dir}icoRun.png"
				    help      : "Test AI"
				}
				MenuButton //1
				{
				    translateX: 170
				    translateY: 5
				}
				MenuButton //2
				{
				    translateX: 200
				    translateY: 5
				}
				MenuButton //3
				{
				    translateX: 230
				    translateY: 5
				}
				Text
				{
				    translateX: 175
				    translateY: 20
				    content   : "AI1"
				    fill      : Color.BLACK
				    font      : Font.font("Courier New", FontWeight.BOLD, 10)
				}
				Text
				{
				    translateX: 205
				    translateY: 20
				    content   : "AI2"
				    fill      : Color.BLACK
				    font      : Font.font("Courier New", FontWeight.BOLD, 10)
				}
				Text
				{
				    translateX: 235
				    translateY: 20
				    content   : "AI3"
				    fill      : Color.BLACK
				    font      : Font.font("Courier New", FontWeight.BOLD, 10)
				}
        ]
    }
    
    override public function create() : Node
    {
        return group;
    }
}